package org.bigdata.framework.core.protocol;

import java.util.HashMap;
import java.util.List;

import org.bigdata.framework.core.model.AnalysisTopic;
import org.bigdata.framework.core.model.CommunityCategory;
import org.bigdata.framework.core.model.CommunityDomain;
import org.bigdata.framework.core.model.CommunityKnowledge;
import org.bigdata.framework.core.model.CommunityKnowledgeCollect;
import org.bigdata.framework.core.model.CommunityKnowledgeComment;
import org.bigdata.framework.core.model.CommunityKnowledgeCommentReply;
import org.bigdata.framework.core.model.CommunityKnowledgeFollower;
import org.bigdata.framework.core.model.CommunityKnowledgeGraph;
import org.bigdata.framework.core.model.CommunityKnowledgeGraphComment;
import org.bigdata.framework.core.model.CommunityKnowledgeGraphDianzan;
import org.bigdata.framework.core.model.CommunityKnowledgeGraphNode;
import org.bigdata.framework.core.model.CommunityKnowledgeGraphTrends;
import org.bigdata.framework.core.model.CommunityKnowledgePoint;
import org.bigdata.framework.core.model.CommunityKnowledgeResource;
import org.bigdata.framework.core.model.CommunityKnowledgeResourceTrends;
import org.bigdata.framework.core.model.CommunityKnowledgeDianzan;
import org.bigdata.framework.core.model.CommunityUserMesssage;
import org.bigdata.framework.core.model.CommunityUserVisitor;
import org.bigdata.framework.core.service.ICommunityCategoryService;
import org.bigdata.framework.core.service.ICommunityDomainService;
import org.bigdata.framework.core.service.ICommunityKnowledgeCollectService;
import org.bigdata.framework.core.service.ICommunityKnowledgeCommentReplyService;
import org.bigdata.framework.core.service.ICommunityKnowledgeCommentService;
import org.bigdata.framework.core.service.ICommunityKnowledgeFollowerService;
import org.bigdata.framework.core.service.ICommunityKnowledgeGraphCommentService;
import org.bigdata.framework.core.service.ICommunityKnowledgeGraphDianzanService;
import org.bigdata.framework.core.service.ICommunityKnowledgeGraphNodeService;
import org.bigdata.framework.core.service.ICommunityKnowledgeGraphService;
import org.bigdata.framework.core.service.ICommunityKnowledgeGraphTrendsService;
import org.bigdata.framework.core.service.ICommunityKnowledgePointService;
import org.bigdata.framework.core.service.ICommunityKnowledgeResourceService;
import org.bigdata.framework.core.service.ICommunityKnowledgeResourceTrendsService;
import org.bigdata.framework.core.service.ICommunityKnowledgeService;
import org.bigdata.framework.core.service.ICommunityKnowledgeDianzanService;
import org.bigdata.framework.core.service.ICommunityUserMesssageService;
import org.bigdata.framework.core.service.ICommunityUserVisitorService;
import org.bigdata.framework.core.utils.MybatisPlusTools;
import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.plugins.Page;

public class CommunityService implements ICommunityService {
    @Autowired
    private ICommunityCategoryService communityCategoryService;
    @Autowired
    private ICommunityDomainService communityDomainService;
    @Autowired
    private ICommunityKnowledgeCommentReplyService communityKnowledgeCommentReplyService;
    @Autowired
    private ICommunityKnowledgeCommentService communityKnowledgeCommentService;
    @Autowired
    private ICommunityKnowledgeFollowerService communityKnowledgeFollowerService;
    @Autowired
    private ICommunityKnowledgeGraphCommentService communityKnowledgeGraphCommentService;
    @Autowired
    private ICommunityKnowledgeGraphDianzanService communityKnowledgeGraphDianzanService;
    @Autowired
    private ICommunityKnowledgeGraphNodeService communityKnowledgeGraphNodeService;
    @Autowired
    private ICommunityKnowledgeGraphService communityKnowledgeGraphService;
    @Autowired
    private ICommunityKnowledgeGraphTrendsService communityKnowledgeGraphTrendsService;
    @Autowired
    private ICommunityKnowledgePointService communityKnowledgePointService;
    @Autowired
    private ICommunityKnowledgeResourceService communityKnowledgeResourceService;
    @Autowired
    private ICommunityKnowledgeResourceTrendsService communityKnowledgeResourceTrendsService;
    @Autowired
    private ICommunityKnowledgeService communityKnowledgeService;
    @Autowired
    private ICommunityUserMesssageService communityUserMesssageService;
    @Autowired
    private ICommunityKnowledgeDianzanService communityKnowledgeDianzanService;
    @Autowired
    private ICommunityKnowledgeCollectService communityKnowledgeCollectService;
    @Autowired
    private ICommunityUserVisitorService communityUserVisitorService;
    @Override
    public CommunityCategory saveCommunityCategory(CommunityCategory communityCategory) {
        boolean r = communityCategoryService.insert(communityCategory);
        if (r) {
            return communityCategory;
        }
        return null;
    }

    @Override
    public CommunityCategory editCommunityCategory(CommunityCategory communityCategory) {
        boolean r = communityCategoryService.updateAllColumnById(communityCategory);
        if (r) {
            return communityCategory;
        }
        return null;
    }

    @Override
    public void deleteCommunityCategory(CommunityCategory communityCategory) {
        boolean r = communityCategoryService.deleteById(communityCategory.getId());
        if (r) {
            System.out.println("communityCategory 删除成功>>>" + communityCategory.getId());
        }
        
    }

    @Override
    public CommunityCategory findCommunityCategory(Integer id) {
        return communityCategoryService.selectById(id);
    }

    @Override
    public List<CommunityCategory> getCommunityCategory() {
        return communityCategoryService.selectList(null);
    }

    @Override
    public List<CommunityCategory> getCommunityCategory(HashMap<String, Object> queryParams, int pageNumber, int pageSize) {
        return communityCategoryService.selectPage(
                new Page<CommunityCategory>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityCategory>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityCategoryCount(HashMap<String, Object> queryParams) {
        return communityCategoryService.selectCount(new MybatisPlusTools<CommunityCategory>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityDomain saveCommunityDomain(CommunityDomain communityDomain) {
        boolean r = communityDomainService.insert(communityDomain);
        if (r) {
            return communityDomain;
        }
        return null;
    }

    @Override
    public CommunityDomain editCommunityDomain(CommunityDomain communityDomain) {
        boolean r = communityDomainService.updateAllColumnById(communityDomain);
        if (r) {
            return communityDomain;
        }
        return null;
    }

    @Override
    public void deleteCommunityDomain(CommunityDomain communityDomain) {
        boolean r = communityDomainService.deleteById(communityDomain.getId());
        if (r) {
            System.out.println("communityDomain 删除成功>>>" + communityDomain.getId());
        }
    }

    @Override
    public CommunityDomain findCommunityDomain(Integer id) {
        return communityDomainService.selectById(id);
    }

    @Override
    public List<CommunityDomain> getCommunityDomain() {
        return communityDomainService.selectList(null);
    }

    @Override
    public List<CommunityDomain> getCommunityDomain(HashMap<String, Object> queryParams, int pageNumber, int pageSize) {
        return communityDomainService.selectPage(
                new Page<CommunityDomain>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityDomain>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityDomainCount(HashMap<String, Object> queryParams) {
        return communityDomainService.selectCount(new MybatisPlusTools<CommunityDomain>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledge saveCommunityKnowledge(CommunityKnowledge communityKnowledge) {
        boolean r = communityKnowledgeService.insert(communityKnowledge);
        if (r) {
            return communityKnowledge;
        }
        return null;
    }

    @Override
    public CommunityKnowledge editCommunityKnowledge(CommunityKnowledge communityKnowledge) {
        boolean r = communityKnowledgeService.updateAllColumnById(communityKnowledge);
        if (r) {
            return communityKnowledge;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledge(CommunityKnowledge communityKnowledge) {
        boolean r = communityKnowledgeService.deleteById(communityKnowledge.getId());
        if (r) {
            System.out.println("communityKnowledge 删除成功>>>" + communityKnowledge.getId());
        }
    }

    @Override
    public CommunityKnowledge findCommunityKnowledge(Integer id) {
        return communityKnowledgeService.selectById(id);
    }

    @Override
    public List<CommunityKnowledge> getCommunityKnowledge() {
        return communityKnowledgeService.selectList(null);
    }

    @Override
    public List<CommunityKnowledge> getCommunityKnowledge(HashMap<String, Object> queryParams, int pageNumber, int pageSize) {
        return communityKnowledgeService.selectPage(
                new Page<CommunityKnowledge>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledge>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeService.selectCount(new MybatisPlusTools<CommunityKnowledge>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeComment saveCommunityKnowledgeComment(CommunityKnowledgeComment communityKnowledgeComment) {
        boolean r = communityKnowledgeCommentService.insert(communityKnowledgeComment);
        if (r) {
            return communityKnowledgeComment;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeComment editCommunityKnowledgeComment(CommunityKnowledgeComment communityKnowledgeComment) {
        boolean r = communityKnowledgeCommentService.updateAllColumnById(communityKnowledgeComment);
        if (r) {
            return communityKnowledgeComment;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeComment(CommunityKnowledgeComment communityKnowledgeComment) {
        boolean r = communityKnowledgeCommentService.deleteById(communityKnowledgeComment.getId());
        if (r) {
            System.out.println("communityKnowledgeComment 删除成功>>>" + communityKnowledgeComment.getId());
        }
        
    }

    @Override
    public CommunityKnowledgeComment findCommunityKnowledgeComment(Integer id) {
        return communityKnowledgeCommentService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeComment> getCommunityKnowledgeComment() {
        return communityKnowledgeCommentService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeComment> getCommunityKnowledgeComment(HashMap<String, Object> queryParams, int pageNumber,
            int pageSize) {
        return communityKnowledgeCommentService.selectPage(
                new Page<CommunityKnowledgeComment>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeComment>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeCommentCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeCommentService.selectCount(new MybatisPlusTools<CommunityKnowledgeComment>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeCommentReply saveCommunityKnowledgeCommentReply(
            CommunityKnowledgeCommentReply communityKnowledgeCommentReply) {
        boolean r = communityKnowledgeCommentReplyService.insert(communityKnowledgeCommentReply);
        if (r) {
            return communityKnowledgeCommentReply;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeCommentReply editCommunityKnowledgeCommentReply(
            CommunityKnowledgeCommentReply communityKnowledgeCommentReply) {
        boolean r = communityKnowledgeCommentReplyService.updateAllColumnById(communityKnowledgeCommentReply);
        if (r) {
            return communityKnowledgeCommentReply;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeCommentReply(CommunityKnowledgeCommentReply communityKnowledgeCommentReply) {
        boolean r = communityKnowledgeCommentReplyService.deleteById(communityKnowledgeCommentReply.getId());
        if (r) {
            System.out.println("communityKnowledgeCommentReply 删除成功>>>" + communityKnowledgeCommentReply.getId());
        }
    }

    @Override
    public CommunityKnowledgeCommentReply findCommunityKnowledgeCommentReply(Integer id) {
        return communityKnowledgeCommentReplyService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeCommentReply> getCommunityKnowledgeCommentReply() {
        return communityKnowledgeCommentReplyService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeCommentReply> getCommunityKnowledgeCommentReply(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeCommentReplyService.selectPage(
                new Page<CommunityKnowledgeCommentReply>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeCommentReply>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeCommentReplyCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeCommentReplyService.selectCount(new MybatisPlusTools<CommunityKnowledgeCommentReply>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeFollower saveCommunityKnowledgeFollower(CommunityKnowledgeFollower communityKnowledgeFollower) {
        boolean r = communityKnowledgeFollowerService.insert(communityKnowledgeFollower);
        if (r) {
            return communityKnowledgeFollower;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeFollower editCommunityKnowledgeFollower(CommunityKnowledgeFollower communityKnowledgeFollower) {
        boolean r = communityKnowledgeFollowerService.updateAllColumnById(communityKnowledgeFollower);
        if (r) {
            return communityKnowledgeFollower;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeFollower(CommunityKnowledgeFollower communityKnowledgeFollower) {
        boolean r = communityKnowledgeFollowerService.deleteById(communityKnowledgeFollower.getId());
        if (r) {
            System.out.println("communityKnowledgeFollower 删除成功>>>" + communityKnowledgeFollower.getId());
        }
    }

    @Override
    public CommunityKnowledgeFollower findCommunityKnowledgeFollower(Integer id) {
        return communityKnowledgeFollowerService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeFollower> getCommunityKnowledgeFollower() {
        return communityKnowledgeFollowerService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeFollower> getCommunityKnowledgeFollower(HashMap<String, Object> queryParams, int pageNumber,
            int pageSize) {
        return communityKnowledgeFollowerService.selectPage(
                new Page<CommunityKnowledgeFollower>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeFollower>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeFollowerCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeFollowerService.selectCount(new MybatisPlusTools<CommunityKnowledgeFollower>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeGraph saveCommunityKnowledgeGraph(CommunityKnowledgeGraph communityKnowledgeGraph) {
        boolean r = communityKnowledgeGraphService.insert(communityKnowledgeGraph);
        if (r) {
            return communityKnowledgeGraph;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeGraph editCommunityKnowledgeGraph(CommunityKnowledgeGraph communityKnowledgeGraph) {
        boolean r = communityKnowledgeGraphService.updateAllColumnById(communityKnowledgeGraph);
        if (r) {
            return communityKnowledgeGraph;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeGraph(CommunityKnowledgeGraph communityKnowledgeGraph) {
        boolean r = communityKnowledgeGraphService.deleteById(communityKnowledgeGraph.getId());
        if (r) {
            System.out.println("communityKnowledgeGraph 删除成功>>>" + communityKnowledgeGraph.getId());
        }
    }

    @Override
    public CommunityKnowledgeGraph findCommunityKnowledgeGraph(Integer id) {
        return communityKnowledgeGraphService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeGraph> getCommunityKnowledgeGraph() {
        return communityKnowledgeGraphService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeGraph> getCommunityKnowledgeGraph(HashMap<String, Object> queryParams, int pageNumber,
            int pageSize) {
        return communityKnowledgeGraphService.selectPage(
                new Page<CommunityKnowledgeGraph>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeGraph>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeGraphCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeGraphService.selectCount(new MybatisPlusTools<CommunityKnowledgeGraph>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeGraphComment saveCommunityKnowledgeGraphComment(
            CommunityKnowledgeGraphComment communityKnowledgeGraphComment) {
        boolean r = communityKnowledgeGraphCommentService.insert(communityKnowledgeGraphComment);
        if (r) {
            return communityKnowledgeGraphComment;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeGraphComment editCommunityKnowledgeGraphComment(
            CommunityKnowledgeGraphComment communityKnowledgeGraphComment) {
        boolean r = communityKnowledgeGraphCommentService.updateAllColumnById(communityKnowledgeGraphComment);
        if (r) {
            return communityKnowledgeGraphComment;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeGraphComment(CommunityKnowledgeGraphComment communityKnowledgeGraphComment) {
        boolean r = communityKnowledgeGraphCommentService.deleteById(communityKnowledgeGraphComment.getId());
        if (r) {
            System.out.println("communityKnowledgeGraphComment 删除成功>>>" + communityKnowledgeGraphComment.getId());
        }
    }

    @Override
    public CommunityKnowledgeGraphComment findCommunityKnowledgeGraphComment(Integer id) {
        return communityKnowledgeGraphCommentService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeGraphComment> getCommunityKnowledgeGraphComment() {
        return communityKnowledgeGraphCommentService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeGraphComment> getCommunityKnowledgeGraphComment(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeGraphCommentService.selectPage(
                new Page<CommunityKnowledgeGraphComment>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeGraphComment>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeGraphCommentCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeGraphCommentService.selectCount(new MybatisPlusTools<CommunityKnowledgeGraphComment>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeGraphDianzan saveCommunityKnowledgeGraphDianzan(
            CommunityKnowledgeGraphDianzan communityKnowledgeGraphDianzan) {
        boolean r = communityKnowledgeGraphDianzanService.insert(communityKnowledgeGraphDianzan);
        if (r) {
            return communityKnowledgeGraphDianzan;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeGraphDianzan editCommunityKnowledgeGraphDianzan(
            CommunityKnowledgeGraphDianzan communityKnowledgeGraphDianzan) {
        boolean r = communityKnowledgeGraphDianzanService.updateAllColumnById(communityKnowledgeGraphDianzan);
        if (r) {
            return communityKnowledgeGraphDianzan;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeGraphDianzan(CommunityKnowledgeGraphDianzan communityKnowledgeGraphDianzan) {
        boolean r = communityKnowledgeGraphDianzanService.deleteById(communityKnowledgeGraphDianzan.getId());
        if (r) {
            System.out.println("communityKnowledgeGraphDianzan 删除成功>>>" + communityKnowledgeGraphDianzan.getId());
        }
    }

    @Override
    public CommunityKnowledgeGraphDianzan findCommunityKnowledgeGraphDianzan(Integer id) {
        return communityKnowledgeGraphDianzanService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeGraphDianzan> getCommunityKnowledgeGraphDianzan() {
        return communityKnowledgeGraphDianzanService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeGraphDianzan> getCommunityKnowledgeGraphDianzan(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeGraphDianzanService.selectPage(
                new Page<CommunityKnowledgeGraphDianzan>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeGraphDianzan>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeGraphDianzanCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeGraphDianzanService.selectCount(new MybatisPlusTools<CommunityKnowledgeGraphDianzan>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeGraphNode saveCommunityKnowledgeGraphNode(CommunityKnowledgeGraphNode communityKnowledgeGraphNode) {
        boolean r = communityKnowledgeGraphNodeService.insert(communityKnowledgeGraphNode);
        if (r) {
            return communityKnowledgeGraphNode;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeGraphNode editCommunityKnowledgeGraphNode(CommunityKnowledgeGraphNode communityKnowledgeGraphNode) {
        boolean r = communityKnowledgeGraphNodeService.updateAllColumnById(communityKnowledgeGraphNode);
        if (r) {
            return communityKnowledgeGraphNode;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeGraphNode(CommunityKnowledgeGraphNode communityKnowledgeGraphNode) {
        boolean r = communityKnowledgeGraphNodeService.deleteById(communityKnowledgeGraphNode.getId());
        if (r) {
            System.out.println("communityKnowledgeGraphNode 删除成功>>>" + communityKnowledgeGraphNode.getId());
        }
    }

    @Override
    public CommunityKnowledgeGraphNode findCommunityKnowledgeGraphNode(Integer id) {
        return communityKnowledgeGraphNodeService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeGraphNode> getCommunityKnowledgeGraphNode() {
        return communityKnowledgeGraphNodeService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeGraphNode> getCommunityKnowledgeGraphNode(HashMap<String, Object> queryParams, int pageNumber,
            int pageSize) {
        return communityKnowledgeGraphNodeService.selectPage(
                new Page<CommunityKnowledgeGraphNode>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeGraphNode>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeGraphNodeCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeGraphNodeService.selectCount(new MybatisPlusTools<CommunityKnowledgeGraphNode>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeGraphTrends saveCommunityKnowledgeGraphTrends(
            CommunityKnowledgeGraphTrends communityKnowledgeGraphTrends) {
        boolean r = communityKnowledgeGraphTrendsService.insert(communityKnowledgeGraphTrends);
        if (r) {
            return communityKnowledgeGraphTrends;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeGraphTrends editCommunityKnowledgeGraphTrends(
            CommunityKnowledgeGraphTrends communityKnowledgeGraphTrends) {
        boolean r = communityKnowledgeGraphTrendsService.updateAllColumnById(communityKnowledgeGraphTrends);
        if (r) {
            return communityKnowledgeGraphTrends;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeGraphTrends(CommunityKnowledgeGraphTrends communityKnowledgeGraphTrends) {
        boolean r = communityKnowledgeGraphTrendsService.deleteById(communityKnowledgeGraphTrends.getId());
        if (r) {
            System.out.println("communityKnowledgeGraphTrends 删除成功>>>" + communityKnowledgeGraphTrends.getId());
        }
    }

    @Override
    public CommunityKnowledgeGraphTrends findCommunityKnowledgeGraphTrends(Integer id) {
        return communityKnowledgeGraphTrendsService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeGraphTrends> getCommunityKnowledgeGraphTrends() {
        return communityKnowledgeGraphTrendsService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeGraphTrends> getCommunityKnowledgeGraphTrends(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeGraphTrendsService.selectPage(
                new Page<CommunityKnowledgeGraphTrends>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeGraphTrends>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeGraphTrendsCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeGraphTrendsService.selectCount(new MybatisPlusTools<CommunityKnowledgeGraphTrends>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgePoint saveCommunityKnowledgePoint(CommunityKnowledgePoint communityKnowledgePoint) {
        boolean r = communityKnowledgePointService.insert(communityKnowledgePoint);
        if (r) {
            return communityKnowledgePoint;
        }
        return null;
    }

    @Override
    public CommunityKnowledgePoint editCommunityKnowledgePoint(CommunityKnowledgePoint communityKnowledgePoint) {
        boolean r = communityKnowledgePointService.updateAllColumnById(communityKnowledgePoint);
        if (r) {
            return communityKnowledgePoint;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgePoint(CommunityKnowledgePoint communityKnowledgePoint) {
        boolean r = communityKnowledgePointService.deleteById(communityKnowledgePoint.getId());
        if (r) {
            System.out.println("communityKnowledgePoint 删除成功>>>" + communityKnowledgePoint.getId());
        }
    }

    @Override
    public CommunityKnowledgePoint findCommunityKnowledgePoint(Integer id) {
        return communityKnowledgePointService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgePoint> getCommunityKnowledgePoint() {
        return communityKnowledgePointService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgePoint> getCommunityKnowledgePoint(HashMap<String, Object> queryParams, int pageNumber,
            int pageSize) {
        return communityKnowledgePointService.selectPage(
                new Page<CommunityKnowledgePoint>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgePoint>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgePointCount(HashMap<String, Object> queryParams) {
        return communityKnowledgePointService.selectCount(new MybatisPlusTools<CommunityKnowledgePoint>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeResource saveCommunityKnowledgeResource(CommunityKnowledgeResource communityKnowledgeResource) {
        boolean r = communityKnowledgeResourceService.insert(communityKnowledgeResource);
        if (r) {
            return communityKnowledgeResource;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeResource editCommunityKnowledgeResource(CommunityKnowledgeResource communityKnowledgeResource) {
        boolean r = communityKnowledgeResourceService.updateAllColumnById(communityKnowledgeResource);
        if (r) {
            return communityKnowledgeResource;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeResource(CommunityKnowledgeResource communityKnowledgeResource) {
        boolean r = communityKnowledgeResourceService.deleteById(communityKnowledgeResource.getId());
        if (r) {
            System.out.println("analysisTopic 删除成功>>>" + communityKnowledgeResource.getId());
        }
    }

    @Override
    public CommunityKnowledgeResource findCommunityKnowledgeResource(Integer id) {
        return communityKnowledgeResourceService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeResource> getCommunityKnowledgeResource() {
        return communityKnowledgeResourceService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeResource> getCommunityKnowledgeResource(HashMap<String, Object> queryParams, int pageNumber,
            int pageSize) {
        return communityKnowledgeResourceService.selectPage(
                new Page<CommunityKnowledgeResource>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeResource>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeResourceCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeResourceService.selectCount(new MybatisPlusTools<CommunityKnowledgeResource>()
                .getEwByCount(queryParams));
    }

    @Override
    public CommunityKnowledgeResourceTrends saveCommunityKnowledgeResourceTrends(
            CommunityKnowledgeResourceTrends communityKnowledgeResourceTrends) {
        boolean r = communityKnowledgeResourceTrendsService.insert(communityKnowledgeResourceTrends);
        if (r) {
            return communityKnowledgeResourceTrends;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeResourceTrends editCommunityKnowledgeResourceTrends(
            CommunityKnowledgeResourceTrends communityKnowledgeResourceTrends) {
        boolean r = communityKnowledgeResourceTrendsService.updateAllColumnById(communityKnowledgeResourceTrends);
        if (r) {
            return communityKnowledgeResourceTrends;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeResourceTrends(CommunityKnowledgeResourceTrends communityKnowledgeResourceTrends) {
        boolean r = communityKnowledgeResourceTrendsService.deleteById(communityKnowledgeResourceTrends.getId());
        if (r) {
            System.out.println("communityKnowledgeResourceTrends 删除成功>>>" + communityKnowledgeResourceTrends.getId());
        }
    }

    @Override
    public CommunityKnowledgeResourceTrends findCommunityKnowledgeResourceTrends(Integer id) {
        return communityKnowledgeResourceTrendsService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeResourceTrends> getCommunityKnowledgeResourceTrends() {
        return communityKnowledgeResourceTrendsService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeResourceTrends> getCommunityKnowledgeResourceTrends(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeResourceTrendsService.selectPage(
                new Page<CommunityKnowledgeResourceTrends>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeResourceTrends>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeResourceTrendsCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeResourceTrendsService.selectCount(new MybatisPlusTools<CommunityKnowledgeResourceTrends>()
                .getEwByCount(queryParams));
    }

    
    
    
    
    
    
    @Override
    public CommunityUserMesssage saveCommunityUserMesssage(
    		CommunityUserMesssage communityUserMesssage) {
        boolean r = communityUserMesssageService.insert(communityUserMesssage);
        if (r) {
            return communityUserMesssage;
        }
        return null;
    }

    @Override
    public CommunityUserMesssage editCommunityUserMesssage(
    		CommunityUserMesssage communityUserMesssage) {
        boolean r = communityUserMesssageService.updateAllColumnById(communityUserMesssage);
        if (r) {
            return communityUserMesssage;
        }
        return null;
    }

    @Override
    public void deleteCommunityUserMesssage(CommunityUserMesssage communityUserMesssage) {
        boolean r = communityUserMesssageService.deleteById(communityUserMesssage.getId());
        if (r) {
            System.out.println("CommunityUserMesssage 删除成功>>>" + communityUserMesssage.getId());
        }
    }

    @Override
    public CommunityUserMesssage findCommunityUserMesssage(Integer id) {
        return communityUserMesssageService.selectById(id);
    }

    @Override
    public List<CommunityUserMesssage> getCommunityUserMesssage() {
        return communityUserMesssageService.selectList(null);
    }

    @Override
    public List<CommunityUserMesssage> getCommunityUserMesssage(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityUserMesssageService.selectPage(
                new Page<CommunityUserMesssage>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityUserMesssage>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityUserMesssageCount(HashMap<String, Object> queryParams) {
        return communityUserMesssageService.selectCount(new MybatisPlusTools<CommunityUserMesssage>()
                .getEwByCount(queryParams));
    }
    //communityKnowledgeDianzanService
    @Override
    public CommunityKnowledgeDianzan saveCommunityKnowledgeDianzan(
    		CommunityKnowledgeDianzan communityKnowledgeDianzan) {
        boolean r = communityKnowledgeDianzanService.insert(communityKnowledgeDianzan);
        if (r) {
            return communityKnowledgeDianzan;
        }
        return null;
    }

    @Override
    public CommunityKnowledgeDianzan editCommunityKnowledgeDianzan(
    		CommunityKnowledgeDianzan communityKnowledgeDianzan) {
        boolean r = communityKnowledgeDianzanService.updateAllColumnById(communityKnowledgeDianzan);
        if (r) {
            return communityKnowledgeDianzan;
        }
        return null;
    }

    @Override
    public void deleteCommunityKnowledgeDianzan(CommunityKnowledgeDianzan communityKnowledgeDianzan) {
        boolean r = communityKnowledgeDianzanService.deleteById(communityKnowledgeDianzan.getId());
        if (r) {
            System.out.println("CommunityKnowledgeDianzan 删除成功>>>" + communityKnowledgeDianzan.getId());
        }
    }

    @Override
    public CommunityKnowledgeDianzan findCommunityKnowledgeDianzan(Integer id) {
        return communityKnowledgeDianzanService.selectById(id);
    }

    @Override
    public List<CommunityKnowledgeDianzan> getCommunityKnowledgeDianzan() {
        return communityKnowledgeDianzanService.selectList(null);
    }

    @Override
    public List<CommunityKnowledgeDianzan> getCommunityKnowledgeDianzan(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeDianzanService.selectPage(
                new Page<CommunityKnowledgeDianzan>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeDianzan>().getEwByList(queryParams))
                .getRecords();
    }

    @Override
    public Integer getCommunityKnowledgeDianzanCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeDianzanService.selectCount(new MybatisPlusTools<CommunityKnowledgeDianzan>()
                .getEwByCount(queryParams));
    }
    
    
    //知识库收藏
    @Override
    public CommunityKnowledgeCollect saveCommunityKnowledgeCollect(
    		CommunityKnowledgeCollect communityKnowledgeCollect) {
        boolean r = communityKnowledgeCollectService.insert(communityKnowledgeCollect);
        if (r) {
            return communityKnowledgeCollect;
        }
        return null;
    }
    @Override
    public CommunityKnowledgeCollect editCommunityKnowledgeCollect(
    		CommunityKnowledgeCollect communityKnowledgeCollect) {
        boolean r = communityKnowledgeCollectService.updateAllColumnById(communityKnowledgeCollect);
        if (r) {
            return communityKnowledgeCollect;
        }
        return null;
    }
    @Override
    public void deleteCommunityKnowledgeCollect(CommunityKnowledgeCollect communityKnowledgeCollect) {
        boolean r = communityKnowledgeCollectService.deleteById(communityKnowledgeCollect.getId());
        if (r) {
            System.out.println("communityKnowledgeCollect 删除成功>>>" + communityKnowledgeCollect.getId());
        }
    }
    @Override
    public CommunityKnowledgeCollect findCommunityKnowledgeCollect(Integer id) {
        return communityKnowledgeCollectService.selectById(id);
    }
    @Override
    public List<CommunityKnowledgeCollect> getCommunityKnowledgeCollect() {
        return communityKnowledgeCollectService.selectList(null);
    }
    @Override
    public List<CommunityKnowledgeCollect> getCommunityKnowledgeCollect(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityKnowledgeCollectService.selectPage(
                new Page<CommunityKnowledgeCollect>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityKnowledgeCollect>().getEwByList(queryParams))
                .getRecords();
    }
    @Override
    public Integer getCommunityKnowledgeCollectCount(HashMap<String, Object> queryParams) {
        return communityKnowledgeCollectService.selectCount(new MybatisPlusTools<CommunityKnowledgeCollect>()
                .getEwByCount(queryParams));
    }
    
    
    //
    @Override
    public CommunityUserVisitor saveCommunityUserVisitor(
    		CommunityUserVisitor communityUserVisitor) {
        boolean r = communityUserVisitorService.insert(communityUserVisitor);
        if (r) {
            return communityUserVisitor;
        }
        return null;
    }
    @Override
    public CommunityUserVisitor editCommunityUserVisitor(
    		CommunityUserVisitor communityKnowledgeCollect) {
        boolean r = communityUserVisitorService.updateAllColumnById(communityKnowledgeCollect);
        if (r) {
            return communityKnowledgeCollect;
        }
        return null;
    }
    @Override
    public void deleteCommunityUserVisitor(CommunityUserVisitor communityUserVisitor) {
        boolean r = communityUserVisitorService.deleteById(communityUserVisitor.getId());
        if (r) {
            System.out.println("communityUserVisitor 删除成功>>>" + communityUserVisitor.getId());
        }
    }
    @Override
    public CommunityUserVisitor findCommunityUserVisitor(Integer id) {
        return communityUserVisitorService.selectById(id);
    }
    @Override
    public List<CommunityUserVisitor> getCommunityUserVisitor() {
        return communityUserVisitorService.selectList(null);
    }
    @Override
    public List<CommunityUserVisitor> getCommunityUserVisitor(HashMap<String, Object> queryParams,
            int pageNumber, int pageSize) {
        return communityUserVisitorService.selectPage(
                new Page<CommunityUserVisitor>(pageNumber, pageSize),
                new MybatisPlusTools<CommunityUserVisitor>().getEwByList(queryParams))
                .getRecords();
    }
    @Override
    public Integer getCommunityUserVisitorCount(HashMap<String, Object> queryParams) {
        return communityUserVisitorService.selectCount(new MybatisPlusTools<CommunityUserVisitor>()
                .getEwByCount(queryParams));
    }
}
